package com.ssmr.demo.entity;

import java.io.Serializable;
import java.math.BigDecimal;

public class TProductUserOneToOne implements Serializable {

    private TUser tUser;

    public TProductUserOneToOne(TUser tUser, String productName, Integer stock, BigDecimal price, Integer version, String comment) {
        this.tUser = tUser;
        this.productName = productName;
        this.stock = stock;
        this.price = price;
        this.version = version;
        this.comment = comment;
    }

    public TUser gettUser() {

        return tUser;
    }

    public void settUser(TUser tUser) {
        this.tUser = tUser;
    }

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column t_product.idt_product
     *
     * @mbg.generated
     */
    private Integer idtProduct;


    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column t_product.product_name
     *
     * @mbg.generated
     */
    private String productName;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column t_product.stock
     *
     * @mbg.generated
     */
    private Integer stock;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column t_product.price
     *
     * @mbg.generated
     */
    private BigDecimal price;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column t_product.version
     *
     * @mbg.generated
     */
    private Integer version;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column t_product.comment
     *
     * @mbg.generated
     */
    private String comment;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table t_product
     *
     * @mbg.generated
     */
    private static final long serialVersionUID = 1L;

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column t_product.idt_product
     *
     * @return the value of t_product.idt_product
     * @mbg.generated
     */
    public Integer getIdtProduct() {
        return idtProduct;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column t_product.idt_product
     *
     * @param idtProduct the value for t_product.idt_product
     * @mbg.generated
     */
    public void setIdtProduct(Integer idtProduct) {
        this.idtProduct = idtProduct;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column t_product.product_name
     *
     * @return the value of t_product.product_name
     * @mbg.generated
     */
    public String getProductName() {
        return productName;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column t_product.product_name
     *
     * @param productName the value for t_product.product_name
     * @mbg.generated
     */
    public void setProductName(String productName) {
        this.productName = productName == null ? null : productName.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column t_product.stock
     *
     * @return the value of t_product.stock
     * @mbg.generated
     */
    public Integer getStock() {
        return stock;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column t_product.stock
     *
     * @param stock the value for t_product.stock
     * @mbg.generated
     */
    public void setStock(Integer stock) {
        this.stock = stock;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column t_product.price
     *
     * @return the value of t_product.price
     * @mbg.generated
     */
    public BigDecimal getPrice() {
        return price;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column t_product.price
     *
     * @param price the value for t_product.price
     * @mbg.generated
     */
    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column t_product.version
     *
     * @return the value of t_product.version
     * @mbg.generated
     */
    public Integer getVersion() {
        return version;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column t_product.version
     *
     * @param version the value for t_product.version
     * @mbg.generated
     */
    public void setVersion(Integer version) {
        this.version = version;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column t_product.comment
     *
     * @return the value of t_product.comment
     * @mbg.generated
     */
    public String getComment() {
        return comment;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column t_product.comment
     *
     * @param comment the value for t_product.comment
     * @mbg.generated
     */
    public void setComment(String comment) {
        this.comment = comment == null ? null : comment.trim();
    }

    public TProductUserOneToOne() {
    }

    public TProductUserOneToOne(String productName, Integer stock, BigDecimal price, Integer version, String comment) {

        this.productName = productName;
        this.stock = stock;
        this.price = price;
        this.version = version;
        this.comment = comment;
    }

    @Override
    public String toString() {
        return "TProductUserOneToOne{" +
                "tUser=" + tUser +
                ", idtProduct=" + idtProduct +
                ", productName='" + productName + '\'' +
                ", stock=" + stock +
                ", price=" + price +
                ", version=" + version +
                ", comment='" + comment + '\'' +
                '}';
    }
}
